package com.wngbms.spring_boot_learn.service;

import java.util.Iterator;
import java.util.ServiceLoader;

public class MainTest {


    public static void main(String[] args) {

        ServiceLoader<ISPI> load = ServiceLoader.load(ISPI.class);
        Iterator<ISPI> iterator = load.iterator();
        while (iterator.hasNext()) {
            ISPI next = iterator.next();
            next.connect();
        }

    }

}
